package com.qf.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试跨域
 * @author 千锋健哥
 */
@RestController
@RequestMapping("/test")
@CrossOrigin("http://localhost:9090") //允许来自8081服务器发来的请求
public class CrossOriginController {

    @RequestMapping("/t1")
    public String test1() {
        System.out.println("===========跨域请求测试方法=============");
        return "ok";
    }
}
